/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package objects;

import java.util.ArrayList;
import org.lwjgl.util.vector.Vector3f;

/**
 *
 * @author Marcin
 */
public class VectorAvg {
    public int size=0;
    float x;
    float y;
    float z;
    
    public void clear(){
        size=0;
        x=0;
        y=0;
        z=0;
    }
    public void add(float x, float y,float z){
        this.x+=x;
        this.y+=y;
        this.z+=z;
        ++size;
    }
    public Vector3f get(){
        
        x/=size;
        y/=size;
        z/=size;
        return new Vector3f(x,y,z);
    }
    
}
